from datetime import date

print date(1900, 1, 1).weekday()
c = 0
for i in range(1901, 2001):
    for j in range(1, 13):
        if date(i, j, 1).weekday() == 6:
            c += 1
print c